﻿using System.Configuration;

namespace StockholmsStad.WindowsService
{
    /// <summary>
    /// Representerar en konfiguration i config-filen
    /// </summary>
    internal class ServicesConfigurationSection : ConfigurationSection
    {
        #region Properties

        /// <summary>
        /// Hämtar tjänsten från konfigurationen.
        /// </summary>
        /// <value>De definierade tjänsten/tjänsterna.</value>
        [ConfigurationProperty("services", IsDefaultCollection = false)]
        [ConfigurationCollection(typeof(ServiceElementCollection), AddItemName = "add", ClearItemsName = "clear", RemoveItemName = "remove")]
        public ServiceElementCollection Services
        {
            get
            {
                var servicesCollection = (ServiceElementCollection)base["services"];
                return servicesCollection;
            }
        }

        #endregion Properties

    }
}
